package trlygjj.tanruiliyigenjinjin.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter@Getter
public class Employee implements Serializable{
    private static final long serialVersionUID = -1L;
    /**
     * 默认密码是1
     */
    public static final String DEFAULT_PASSWORD = "1";
    /**
     * 默认不是超级管理员
     */
    public static final Integer DEFAULT_ADMIN = 0;
    /**
     * 默认状态是在职
     */
    public static final Integer DEFAULT_STATE = 1;
    /**
     * 超级管理员
     */
    public static final Integer IS_ADMIN = 1;

    /**
     * 不是超级管理员
     */
    public static final Integer NO_ADMIN = 0;

    private Long id;
    // 工号
    private Integer jobNumber;
    //用户
    private String username;
    //部门
    private Department department;
    //职位
    private String positions;
    //招聘类型
    private String hireType;
    //学历
    private String recoed;
    //岗位
    private String jobs;
    //性别
    private String gender;
    //年龄
    private Integer age;
    //电话
    private String tel;
    //邮件
    private String email;
    //生日
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthTime;
    //入职时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inputTime;
    //工龄
    private Double serviceLength;
    //状态
    private Integer state;
    //是否结婚
    private String marital;
    //是否超级管理员
    private Integer admin;
    //地址
    private String address;
    //密码
    private String password;

    List<Role> roles=new ArrayList<>();

    List<Education> educations=new ArrayList();

    List<Home> homes=new ArrayList();

    List<Work> works=new ArrayList();

    private String imagepath;

    private String realpath;

   }